package gsw.demo.router.util;

import android.content.Context;
import android.content.pm.ApplicationInfo;

/**
 * 常用工具类
 */
public class Tool {
    /**
     * 判断是否debug模式
     *
     * @param context
     * @return
     */
    public static boolean isDebug(Context context) {
        try {
            ApplicationInfo info = context.getApplicationInfo();
            return (info.flags & ApplicationInfo.FLAG_DEBUGGABLE) != 0;
        } catch (Exception e) {

        }
        return false;
    }

}
